/******************************************************************************
**                                                                           **
**                 Proprietary and Confidential Information                  **
**                                                                           **
**                 Copyright (c) Conexant Systems, Inc. Unpublished                  **
**                 Copyright (c) Conexant Systems, Inc. Unpublished          **
**                                                                           **
** This source code and the algorithms implemented therein constitute        **
** confidential information and may compromise trade secrets of Conexant Systems,    **
** Inc. or its associates, and any unauthorized use thereof is prohibited.   **
**                                                                           **
******************************************************************************/

#ifndef _dc_rip_api_h_
#define _dc_rip_api_h_

/******************************************************************************
*  FILE FORMAT:
*      1. INCLUDES 
*      2. ENUMERATIONS 
*      3. DEFINES
*      4. STRUCTURES
*      5. GLOBALS
*      6. PRIVATE FUNCTION PROTOTYPES
*      7. FUNCTIONS
******************************************************************************/

/******************************************************************************
*  1. INCLUDES
******************************************************************************/
#include "dc_type.h"
#include "dc_return_codes.h"

#if !defined(WIN32) || defined(CNXT_TX_WIN32_SIMULATION)
#include "tx_api.h"

#include "dc_am_malloc_api.h"
#endif

#include "dc_container_api.h"
#include "dc_imgbuf_api.h"
#include "dc_dmbimg_api.h"

/******************************************************************************
*  2. ENUMERATIONS
******************************************************************************/
typedef enum {
  DC_RIP_STATUS_NONE      = 0x00,
  DC_RIP_STATUS_IDLE      = 0x01,
  DC_RIP_STATUS_PAGE      = 0x02,
  DC_RIP_STATUS_DMB_LIMIT = 0x04,   // SYS_DMB_LIMIT
  DC_RIP_STATUS_MEMORY    = 0x08,
  DC_RIP_STATUS_ERROR     = 0x10
} DC_RIP_STATUS_t;

typedef enum {
  DC_RIP_SOURCE_TYPE_DMBIMG = 0,
  DC_RIP_SOURCE_TYPE_DMBBUF,
  DC_RIP_SOURCE_TYPE_IMGBUF,
  DC_RIP_SOURCE_TYPE_CIRCBUF,
  DC_RIP_SOURCE_TYPE_MEMORY,
  DC_RIP_SOURCE_TYPE_FILENAME,
  DC_RIP_SOURCE_TYPE_ON_DEMAND,
  DC_RIP_SOURCE_TYPE_ROM,
  
  DC_RIP_SOURCE_TYPE_LAST
} DC_RIP_SOURCE_TYPE_t;

typedef enum {
  DC_RIP_OBJECT_TYPE_TEXT = 0,
  DC_RIP_OBJECT_TYPE_JPEG,
  DC_RIP_OBJECT_TYPE_BMP,
  DC_RIP_OBJECT_TYPE_PNG,
  DC_RIP_OBJECT_TYPE_GRAPHIC,
  
  DC_RIP_OBJECT_TYPE_LAST
} DC_RIP_OBJECT_TYPE_t;

typedef enum {
  DC_RIP_OBJECT_DIR_NORMAL=0x00,
  DC_RIP_OBJECT_DIR_CENTER=0x01,
  DC_RIP_OBJECT_DIR_RIGHT =0x02,
  DC_RIP_OBJECT_DIR_90    =0x04,
  DC_RIP_OBJECT_DIR_270   =0x08,
  DC_RIP_OBJECT_DIR_180   =0x10
} DC_RIP_OBJECT_DIR_t;

#define DC_RIP_OBJECT_DIR_CW  DC_RIP_OBJECT_DIR_90
#define DC_RIP_OBJECT_DIR_CCW DC_RIP_OBJECT_DIR_270

typedef enum {
  DC_RIP_GRAPHIC_TYPE_BOX = 0,
  DC_RIP_GRAPHIC_TYPE_LAST
} DC_RIP_GRAPHIC_TYPE_t;

typedef enum {
  DC_RIP_TEXT_CACHING_OP_NONE=0,
  DC_RIP_TEXT_CACHING_OP_GLYPH=1,
  /* With bitmap font, GLYPH will be cached for code being transformed, instead. */
  DC_RIP_TEXT_CACHING_OP_BITMAP=2,
  DC_RIP_TEXT_CACHING_OP_LAST,
} DC_RIP_TEXT_CACHING_OP_t;

// remove below later...
#define DC_RIP_TEXT_CACHE_CMD_NONE 0
typedef UINT32 DC_RIP_TEXT_CACHE_CMD_t;

#define DC_RIP_PAGE_HEIGHT_OPTION_NONE     0
#define DC_RIP_PAGE_HEIGHT_OPTION_BAND     1
#define DC_RIP_PAGE_HEIGHT_OPTION_OBJECT   2
typedef UINT32 DC_RIP_PAGE_HEIGHT_OPTION_t;

/******************************************************************************
*  3. DEFINES
******************************************************************************/
#define RIP_DEFAULT_STACK_BYTES   (8*1024)   // thread stack
#define RIP_THREAD_NAME_LENGTH    12

#define UNICODE_MAX_SIZE  4
/******************************************************************************
*  4. STRUCTURES
******************************************************************************/
#if !defined(WIN32) || defined(CNXT_TX_WIN32_SIMULATION)
typedef struct {
  TX_THREAD control;
  char name[RIP_THREAD_NAME_LENGTH];
  UINT32 stack[RIP_DEFAULT_STACK_BYTES/4];
} DC_RIP_THREAD_t;
#endif

typedef struct {
  DC_RIP_OBJECT_TYPE_t object_type;
  UINT32 font_handle;
  void   *p_reserve;
  UINT32 code_unit_size;
  void   *p_unicode_string;
  UINT32 text_h_size;
  UINT32 text_v_size;
  UINT32 resolution;
  UINT32 x_pos;
  UINT32 y_pos;
  DC_RIP_OBJECT_DIR_t direction;
  UINT8 color[3];

  UINT32 reseved;
} DC_RIP_TEXT_OBJECT_SET_t;

typedef struct {
  DC_RIP_OBJECT_TYPE_t object_type;
  DC_RIP_GRAPHIC_TYPE_t graphic_type;

  UINT32 width;
  UINT32 height;

  UINT32 x_pos;
  UINT32 y_pos;

  UINT8 color[3];

  UINT32 reserved[4];

} DC_RIP_GRAPHIC_OBJECT_SET_t;

typedef struct {
  DC_RIP_OBJECT_TYPE_t object_type;
  DC_RIP_SOURCE_TYPE_t source_type;
  void  *p_data;  // pointer of input container
  UINT32 output_width;
  UINT32 output_height;
  UINT32 x_pos;
  UINT32 y_pos;
  DC_RIP_OBJECT_DIR_t direction;

  boolean crop_enable;
  UINT32 crop_x1;
  UINT32 crop_y1;
  UINT32 crop_x2;
  UINT32 crop_y2;

  UINT8 color_key[3];

  void (*readyCallback)(void *arg);
  void *readyCallbackArg;

} DC_RIP_OBJECT_SET_t;

typedef struct {
  DC_IMGBUF *p_output_image;
  DC_IMGBUF *p_content_type;
  DC_CIRCBUF *p_extent_map;

} DC_RIP_API_t;

#if !defined(WIN32) || defined(CNXT_TX_WIN32_SIMULATION)

struct DC_RIP_CONTEXT_STRUCT
{
  DC_RIP_API_t api;
  DC_RIP_STATUS_t status;
  UINT32 nop_cancel;

  DC_RIP_THREAD_t thread;
  UINT32 signature;
  void (*callback)(void *arg, DC_RIP_STATUS_t status);
  void *callback_arg;

  TX_EVENT_FLAGS_GROUP eventflags;

  UINT32 calls_flag;

  void *p_op_data;

  // setup params
  UINT32 n_max_colors;
  UINT32 n_max_width;
  UINT32 n_max_height;
  UINT32 n_max_objects;
  UINT32 n_max_text_objects;
  UINT32 n_max_font_faces;
  UINT32 jpeg_existence;
  UINT32 jpeg_resolution_reduction;
  UINT32 jpeg_n_max_width;
  UINT32 content_type_enabled;
  UINT32 extent_map_enabled;

  DC_IMAGE_CHANNELS n_page_channels;
  UINT32 n_page_width;
  UINT32 n_page_height;

  UINT32 cache_bytes_base;
  UINT32 cache_bytes_size;
  UINT32 ft_ctx_bytes_size;
  UINT32 ft_bytes_size;

  UINT32 dec_pipe_mem_size;
  UINT32 dec_pipe_img_mem_size;
  UINT32 enc_pipe_mem_size;
  UINT32 second_psss_mem_size;

  UINT32 noncache_bytes_base;
  UINT32 noncache_bytes_size;
  UINT32 noncache_bytes_current_base;
  UINT32 noncache_bytes_current_size;

#ifdef USE_DIRECT_TX_BYTE_POOL
  OSPL_BYTE_POOL ft_bytes_pool;
  OSPL_BYTE_POOL cache_bytes_pool;
  //OSPL_BYTE_POOL noncache_bytes_pool;
#else
  DC_AM_ARENA_t ft_bytes_pool;
  DC_AM_ARENA_t cache_bytes_pool;
  //DC_AM_ARENA_t noncache_bytes_pool;
#endif

  UINT32 n_objects_req;
  UINT32 n_text_objects_req;

  void* ft_library;   // FT_Libary ft_library;
  void *p_ft_ctx;
  UINT32 n_ft_inited;

  DC_RIP_TEXT_CACHING_OP_t text_caching_op;
  UINT32 n_max_cachable_glyphs;
};

typedef struct DC_RIP_CONTEXT_STRUCT DC_RIP_CONTEXT_t;

#endif

/******************************************************************************
*  5. GLOBALS
******************************************************************************/

/******************************************************************************
*  6. FUNCTION PROTOTYPES
******************************************************************************/

#if !defined(WIN32) || defined(CNXT_TX_WIN32_SIMULATION)

/*****************************************************************************/
/*  @brief      for client to begin set-up of rip work
 *
 *  @ingroup    RIP
 *  @b function dc_rip_setup_begin
 *
 *  @param      pContext - pointer to DC_RIP_CONTEXT_t structure
 *  @return     DC_SUCCESS, DC_FAILURE, DC_BAD_ARGUMENT
 *
 *****************************************************************************/
DC_RETURN_CODE dc_rip_setup_begin
 (DC_RIP_CONTEXT_t *pContext);

/*****************************************************************************/
/*  @brief      for client to set max output
 *
 *  @ingroup    RIP
 *  @b function dc_rip_setup_max_output_set
 *
 *  @param      pContext - pointer to DC_RIP_CONTEXT_t structure
 *  @param      n_max_colors - the max number of output components
 *  @param      max_width - max output width
 *  @param      max_height - max output height
 *  @return     DC_SUCCESS, DC_FAILURE, DC_BAD_ARGUMENT
 *
 *****************************************************************************/
DC_RETURN_CODE dc_rip_setup_max_output_set
 (DC_RIP_CONTEXT_t *pContext,
  UINT32 n_max_width,
  UINT32 n_max_height,
  UINT32 n_max_colors,
  UINT32 reserved);

/*****************************************************************************/
/*  @brief      for client to set # of objects
 *
 *  @ingroup    RIP
 *  @b function dc_rip_setup_jpeg_info_set
 *
 *  @param      pContext - pointer to DC_RIP_CONTEXT_t structure
 *  @param      n_max_objects - the max number of input objects
 *  @param      n_max_text_objects - the max number of text object
 *  @return     DC_SUCCESS, DC_FAILURE, DC_BAD_ARGUMENT
 *
 *****************************************************************************/
DC_RETURN_CODE dc_rip_setup_max_objects_set
 (DC_RIP_CONTEXT_t *pContext,
  UINT32 n_max_objects,
  UINT32 n_max_text_objects);

/*****************************************************************************/
/*  @brief      for client to set jpeg info
 *
 *  @ingroup    RIP
 *  @b function dc_rip_setup_jpeg_info_set
 *
 *  @param      pContext - pointer to DC_RIP_CONTEXT_t structure
 *  @param      jpeg_existence - jpeg input being rendered
 *  @param      resolution_reduction_enabled
 *  @param      n_max_width - the max width of jpeg input image to process
 *  @return     DC_SUCCESS, DC_FAILURE, DC_BAD_ARGUMENT
 *
 *****************************************************************************/
DC_RETURN_CODE dc_rip_setup_jpeg_info_set
 (DC_RIP_CONTEXT_t *pContext,
  boolean jpeg_existence,
  boolean resolution_reduction_enabled,
  UINT32  n_max_width);

/*****************************************************************************/
/*  @brief      for client to set whether content_type or extent_map output is produced.
 *
 *  @ingroup    RIP
 *  @b function dc_rip_setup_secondary_output_set
 *
 *  @param      pContext - pointer to DC_RIP_CONTEXT_t structure
 *  @param      content_type - TRUE if content_type output needs to be created
 *  @param      extent_map - TRUE if extent_map output needs to be created.
 *  @return     DC_SUCCESS, DC_FAILURE, DC_BAD_ARGUMENT
 *
 *****************************************************************************/
DC_RETURN_CODE dc_rip_setup_secondary_output_set
 (DC_RIP_CONTEXT_t *pContext,
  boolean content_type,
  boolean extent_map);

/*****************************************************************************/
/*  @brief      for client to set max font forces
 *
 *  @ingroup    RIP
 *  @b function dc_rip_setup_max_font_faces_set
 *
 *  @param      pContext - pointer to DC_RIP_CONTEXT_t structure
 *  @param      n_max_fonts - the max number of fonts in use
 *  @return     DC_SUCCESS, DC_FAILURE, DC_BAD_ARGUMENT
 *
 *****************************************************************************/
DC_RETURN_CODE dc_rip_setup_max_font_faces_set
 (DC_RIP_CONTEXT_t *pContext,
  UINT32 n_max_font_faces);

DC_RETURN_CODE dc_rip_setup_text_cache_op_set
 (DC_RIP_CONTEXT_t *pContext,
  DC_RIP_TEXT_CACHING_OP_t op_mode,
  UINT32 n_max_cache_codes,
  UINT32 reserve);

/*****************************************************************************/
/*  @brief      for client to finish set-up of rip work
 *
 *  @ingroup    RIP
 *  @b function dc_rip_setup_end
 *
 *  @param      pContext - pointer to DC_RIP_CONTEXT_t structure
 *  @param      pMemParams - pointer to DC_MEM_PARAMS_t structure
 *  @return     DC_SUCCESS, DC_FAILURE, DC_BAD_ARGUMENT
 *
 *****************************************************************************/
DC_RETURN_CODE dc_rip_setup_end
 (DC_RIP_CONTEXT_t *pContext,
  DC_MEM_PARAMS_t *pMemParams);

/*****************************************************************************/
/*  @brief      for client to create and start a RIP thread
 *
 *  @ingroup    RIP
 *  @b function dc_rip_create
 *
 *  @param      pContext - pointer to DC_RIP_CONTEXT_t structure
 *  @param      name - pointer to thread name string
 *  @param      priority - Thread priority
 *  @param      callback - function pointer to callback
 *  @param      callback_arg - pointer to first argument of callback
 *  @return     DC_SUCCESS, DC_FAILURE, DC_BAD_ARGUMENT
 *
 *****************************************************************************/
DC_RETURN_CODE dc_rip_create
 (DC_RIP_CONTEXT_t *pContext,
  char *name,
  DC_MEM_PARAMS_t *pMemParams,
  DC_THREAD_PRIORITY priority,
  void (*callback)(void *arg, DC_RIP_STATUS_t status),
  void *callback_arg);

/*****************************************************************************/
/*  @brief      for client to retrieve font face info in association with the index
 *
 *  @ingroup    RIP
 *  @b function dc_rip_freetype_font_face_query
 *
 *  @param      pContext - pointer to DC_RIP_CONTEXT_t structure
 *  @param      p_font_name - pointer to font name
 *  @param      font_file_size - the file size of font in memory
 *  @param      p_bitmap_font_width - pointer to datum bitmap font width retunrns
 *  @param      p_bitmap_font_height - pointer to datum bitmap font height returns
 *  @return     DC_SUCCESS, DC_FAILURE, DC_BAD_ARGUMENT
 *
 *****************************************************************************/
DC_RETURN_CODE dc_rip_freetype_font_face_query
 (DC_RIP_CONTEXT_t *pContext,
  char *p_font_name,
  UINT32 font_file_size,
  UINT32 font_face_index,
  UINT32 *p_bitmap_font_width,
  UINT32 *p_bitmap_font_height);

/*****************************************************************************/
/*  @brief      for client to set freetype font
 *
 *  @ingroup    RIP
 *  @b function dc_rip_freetype_font_face_set
 *
 *  @param      pContext - pointer to DC_RIP_CONTEXT_t structure
 *  @param      p_font_name - pointer to font name
 *  @param      font_file_size - the file size of font in memory
 *  @param      n_font_face_handle - pointer to datum font handle returns to
 *  @return     DC_SUCCESS, DC_FAILURE, DC_BAD_ARGUMENT
 *
 *****************************************************************************/
DC_RETURN_CODE dc_rip_freetype_font_face_set
 (DC_RIP_CONTEXT_t *pContext,
  char *p_font_name,
  UINT32 font_file_size,
  UINT32 font_face_index,
  UINT32 *n_font_face_handle);

/*****************************************************************************/
/*  @brief      for client to query font metrics
 *
 *  @ingroup    RIP
 *  @b function dc_rip_freetype_font_metric_query
 *
 *  @param      pContext - pointer to DC_RIP_CONTEXT_t structure
 *  @param      font_handle - font handle to use
 *  @param      points - text size in points
 *  @param      resolution - resolution 
 *  @param      r_height - pointer to datum height value returns to
 *  @param      r_ascender - pointer to datum ascender value returns to
 *  @param      r_descender - pointer to datum descender value returns to
 *  @param      reserve - future use
 *  @param      
 *  @return     DC_SUCCESS, DC_FAILURE, DC_BAD_ARGUMENT
 *
 *****************************************************************************/
DC_RETURN_CODE dc_rip_freetype_font_metric_query
 (DC_RIP_CONTEXT_t *pContext,
  UINT32 font_handle,
  UINT32 points,
  UINT32 resolution,
  UINT32 *r_height,
  INT32 *r_ascender,
  INT32 *r_descender,
  void *reserve);

/*****************************************************************************/
/*  @brief      for client to query the size of string
 *
 *  @ingroup    RIP
 *  @b function dc_rip_freetype_font_string_info_query
 *
 *  @param      pContext - pointer to DC_RIP_CONTEXT_t structure
 *  @param      p_text
 *  @param      p_string_width - pointer to datum font width (post rotation) returns to
 *  @param      p_string_height - pointer to datum font height (post rotation) returns to
 *  @param      reserve - 
 *  @param      p_reserve - 
 *  @param      
 *  @return     DC_SUCCESS, DC_FAILURE, DC_BAD_ARGUMENT
 *
 *****************************************************************************/
DC_RETURN_CODE dc_rip_freetype_font_string_info_query
 (DC_RIP_CONTEXT_t *pContext,
  DC_RIP_TEXT_OBJECT_SET_t *p_text,
  UINT32 *p_string_width,
  UINT32 *p_string_height,
  UINT32 reserve,
  void ** p_reserve);

/*****************************************************************************/
/*  @brief      for client to cancel the RIP thread
 *
 *  @ingroup    RIP
 *  @b function dc_rip_cancel
 *
 *  @param      pContext - pointer to DC_RIP_CONTEXT_t structure
 *  @return     DC_SUCCESS, DC_FAILURE, DC_BAD_ARGUMENT
 *
 *****************************************************************************/
DC_RETURN_CODE dc_rip_cancel
 (DC_RIP_CONTEXT_t *pContext);

/*****************************************************************************/
/*  @brief      for client to delete the RIP thread
 *
 *  @ingroup    RIP
 *  @b function dc_rip_delete
 *
 *  @param      pContext - pointer to DC_RIP_CONTEXT_t structure
 *  @return     DC_SUCCESS, DC_FAILURE, DC_BAD_ARGUMENT
 *
 *****************************************************************************/
DC_RETURN_CODE dc_rip_delete
 (DC_RIP_CONTEXT_t *pContext);

/*****************************************************************************/
/*  @brief      for client to get the status of the RIP thread
 *
 *  @ingroup    RIP
 *  @b function dc_rip_status_get
 *
 *  @param      pContext - pointer to DC_RIP_CONTEXT_t structure
 *  @param      status - pointer to DC_RIP_STATUS_t structure
 *  @return     DC_SUCCESS, DC_FAILURE, DC_BAD_ARGUMENT
 *
 *****************************************************************************/
DC_RETURN_CODE dc_rip_status_get
 (DC_RIP_CONTEXT_t *pContext,
  DC_RIP_STATUS_t  *status);

/*****************************************************************************/
/*  @brief      for client to begin a page configuration of rip work
 *
 *  @ingroup    RIP
 *  @b function dc_rip_page_begin
 *
 *  @param      pContext - pointer to DC_RIP_CONTEXT_t structure
 *  @return     DC_SUCCESS, DC_FAILURE, DC_BAD_ARGUMENT
 *
 *****************************************************************************/
DC_RETURN_CODE dc_rip_page_begin
 (DC_RIP_CONTEXT_t *pContext);

/*****************************************************************************/
/*  @brief      for client to cancel page processing of the RIP thread
 *
 *  @ingroup    RIP
 *  @b function dc_rip_page_cancel
 *
 *  @param      pContext - pointer to DC_RIP_CONTEXT_t structure
 *  @return     DC_SUCCESS, DC_FAILURE, DC_BAD_ARGUMENT
 *
 *****************************************************************************/
DC_RETURN_CODE dc_rip_page_cancel
 (DC_RIP_CONTEXT_t *pContext);

/*****************************************************************************/
/*  @brief      for client to complete page configuration and launch page processing.
 *
 *  @ingroup    RIP
 *  @b function dc_rip_page_end
 *
 *  @param      pContext - pointer to DC_RIP_CONTEXT_t structure
 *  @param      p_output_imgbuf - pointer to output IMGBUF container
 *  @param      p_content_type - pointer to optional output IMGBUF container for content type
 *  @param      p_extent_map - pointer to optional output CIRBUF container for extent map
 *  @return     DC_SUCCESS, DC_FAILURE, DC_BAD_ARGUMENT
 *
 *****************************************************************************/
DC_RETURN_CODE dc_rip_page_end
 (DC_RIP_CONTEXT_t *pContext,
  DC_IMGBUF *p_output_imgbuf,
  DC_IMGBUF *p_content_type,
  DC_CIRCBUF *p_extent_map);

/*****************************************************************************/
/*  @brief      for client to specify output of page
 *
 *  @ingroup    RIP
 *  @b function dc_rip_page_output_set
 *
 *  @param      pContext - pointer to DC_RIP_CONTEXT_t structure
 *  @param      n_output_width - specify the width of output page in pixel.
 *  @param      n_output_height - specify the height of output page in line.
 *  @param      n_output_channels - specify the # of components of output page, {1,3}
 *  @param      height_option - specify whether or not the number of lines of output page
 *              is limited by the size of processing band height or the last line of objects.
 *              thus actaul created lines of output can be shorter than desired height n_output_height
 *              by cutting off white regions following valid all objects in page.
 *  @return     DC_SUCCESS, DC_FAILURE, DC_BAD_ARGUMENT
 *
 *****************************************************************************/
DC_RETURN_CODE dc_rip_page_output_set
 (DC_RIP_CONTEXT_t *pContext,
  UINT32 n_output_width,
  UINT32 n_output_height,
  DC_IMAGE_CHANNELS n_output_channels,
  DC_RIP_PAGE_HEIGHT_OPTION_t height_option);

/*****************************************************************************/
/*
 *  @ingroup    RIP
 *  @b function dc_rip_page_prapi_set
 *
 *  @param      pContext - pointer to DC_RIP_CONTEXT_t structure
 *  @param      enable - 
 *  @return     DC_SUCCESS, DC_FAILURE, DC_BAD_ARGUMENT
 *
 *****************************************************************************/
DC_RETURN_CODE dc_rip_page_prapi_set
 (DC_RIP_CONTEXT_t *pContext,
  boolean enable);

/*****************************************************************************/
/*  @brief      for client to put a new object on output
 *
 *  @ingroup    RIP
 *  @b function dc_rip_page_object_default_set
 *
 *  @param      pContext - pointer to DC_RIP_CONTEXT_t structure
 *  @param      type - object type to add
 *  @param      p_object - pointer to point to the object data structure
 *  @return     DC_SUCCESS, DC_FAILURE, DC_BAD_ARGUMENT
 *
 *****************************************************************************/
DC_RETURN_CODE dc_rip_page_object_default_set
 (DC_RIP_CONTEXT_t *pContext,
  DC_RIP_OBJECT_TYPE_t type,
  void *p_object);

/*****************************************************************************/
/*  @brief      for client to add a object
 *
 *  @ingroup    RIP
 *  @b function dc_rip_page_object_add
 *
 *  @param      pContext - pointer to DC_RIP_CONTEXT_t structure
 *  @param      type - object type to add
 *  @param      p_object - pointer to point to the object data structure
 *  @return     DC_SUCCESS, DC_FAILURE, DC_BAD_ARGUMENT
 *
 *****************************************************************************/
DC_RETURN_CODE dc_rip_page_object_add
 (DC_RIP_CONTEXT_t *pContext,
  DC_RIP_OBJECT_TYPE_t type,
  void *p_object);

#endif

#endif
